
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>团队 - frm</title>
        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
        <meta content="yes" name="apple-mobile-web-app-capable"/>
        <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
        <meta content="telephone=no" name="format-detection"/>
        <link href="../Ryancss/tuandui.css" rel="stylesheet" type="text/css"/>

    </head>
    <body>

				<audio src='../Ryanvoice/tuandui_no.mp3' style='display:none' id='tuandui_audio_no'></audio> 
				
        <section class="aui-flexView">
            <section class="aui-scrollView">

                <div class="aui-flex b-line">
                    <div class="aui-flex-title" id="title">好友列表 </div>
                    <div class="aui-flex-box aui-flex-box-right" id="tudi">
                        
                    </div>
					
					
                </div>
				
				
				<!--
				<span style=" font-size: 10px; " > <i class="icon-tuandui icon-tuandui_ico_1">代理</i>    <i class="icon-tuandui icon-tuandui_ico_2">用户</i> </span>
-->




<div class="aui-member-service b-line">
                    <div class="aui-grids">
                        <a href="javascript:;" class="aui-grids-item aui-grids-item-right">
                            <div class="aui-grids-item-icon-js aui-grids-item-icon-add">图标</div>
                            <div class="aui-grids-item-icon-js aui-grids-item-icon-add">Tips</div>
                        </a>
						
                        <a class="aui-grids-item">
                            <div class="aui-grids-item-icon">
                                <img src="../Ryanimg/tuandui/tuandui_ico_2_big.png" alt="">
                            </div>
                            <div class="aui-grids-item-text">用户</div>
                        </a>                        
						
                        <a class="aui-grids-item">
                            <div class="aui-grids-item-icon">
                                <img src="../Ryanimg/tuandui/tuandui_ico_1_big.png" alt="">
                            </div>
                            <div class="aui-grids-item-text">代理</div>
                        </a>
						
<!--						<a class="aui-grids-item">
                            <div class="aui-grids-item-icon">
                                <img src="../Ryanimg/tuandui/tuandui_ico_0_big.png" alt="">
                            </div>
                            <div class="aui-grids-item-text">管理员</div>
                        </a>
			
-->
                    </div>

                </div>













				
				
			<div  id="istuanduino"  style=" margin-bottom: 20px; ">    
                <div class="aui-payment-list" id="tudilist"> 
    
                </div>
				
		           
			</div >		

             
			 
            </section>
        </section>

    </body>
	
	
	
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
	var api_url = localStorage.getItem('api_url');
	apiready = function(){
		
		
		    api.parseTapmode();
		
	/*	
				api.showProgress({
				    title: '正在加载',
				    text: '请稍等',
				    modal: false
				});
				
 	*/


		
			
	
	if(localStorage.getItem('power')==1){
	  title.innerHTML = '我的团队';
	}
	
		
		
		api.ajax({
			url: api_url + '/login/login/sign.html',
			method: 'get',
			data: {
				values: {
					key: localStorage.getItem('anq_key'),   //安全码
					uid: localStorage.getItem('user_id')
				}
			}
		}, function(ret, err) {
			if(ret) {
			
			
			
				var tudi = $api.byId('tudi');//团队人数
				tudi.innerHTML = ret.msg['tudi']+'人';
				
					if(ret.msg['tudi'] == "0" ) {
					
					
					
							document.getElementById('tuandui_audio_no').play();   //没有成员提示
					
									/*
									api.toast({
									msg: '还没成员',
									duration: 3000
									});
									*/
									
						istuanduino.innerHTML =  '<img src="" style="width:100%;display:inline-block;border-radius:5px;margin-top: .5rem;">  ';       
					
					}else{
					
									/*
									api.toast({
									msg: '已经有很多很多',
									duration: 3000
									});
									*/
					
					}
				
				
				
				
				
				
				
				
				var tuandui_frm = $api.byId('tudilist');//团队列表
				
				
				data = ret.msg['tudilist'];
				for(var i=0;i<data.length;i++){ 
					
					var html='<a class="aui-flex-z  b-line">'+
							'		<div class="aui-payment-img"> '+
							'			<img src="../Ryanimg/tuandui/tuandui_ico_'+data[i].power+'.png">'+
							'		</div>'+
							'		<div class="aui-flex-box">'+
							'				<h2>UID: '+data[i].id+'</h2>'+
							'			   <p>'+data[i].username.substr(0,3)+'***'+data[i].username.substring(data[i].username.length-4)+' | '+data[i].nick_name+'</p>'+
							'		</div>'+
							'              <span class="aui-flex-mo">  '+data[i].Source+'</span> '+
							'		</a>';
							
				/*	var html='<div class="aui-well-list">'+
							'		<a class="aui-well-item">'+
							'			<div class="aui-well-item-bd">'+
							'				<img src="../image/app/new_backup/ico_bf_1.png" alt="" style="width: 20px;display: inline-block;">'+
							'				<span style="width:15%;display: inline-block;text-align: center;">'+data[i].id+'</span>'+
							'				<span style="width:40%;display: inline-block;text-align: center;">'+data[i].Source+'</span>'+
							'				<span style="width:30%;display: inline-block;text-align: center;">'+data[i].username.substr(0,3)+'***'+data[i].username.substring(data[i].username.length-4)+'</span>'+
							'			</div>'+
							'		</a>'+
							'	</div>';
							
					*/		
							
							
					$api.append(tuandui_frm,html);
				}
				
				
			}
          api.hideProgress();
		}); 
		
		
	}
	
	
	
	
	
</script>
	
	
	
	
	
	
	
	
</html>
